﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;

namespace Bonobo.Reader.Feeds.UI
{
    public partial class FeedItemResourceDictionary : ResourceDictionary
    {
        public FeedItemResourceDictionary()
        {
            InitializeComponent();
        }

        public DataTemplate DataTemplate
        {
            get { return base["FeedItemTemplate"] as DataTemplate; } 
        }

        private void MarkAsReadCanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute = true;
        }

        private void MarkAsReadExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var item = (FeedItem)e.Parameter;
            item.MarkAsRead();
        }
    }
}
